<?php

class Application_Form_Sendmsg extends Zend_Form
{

    public function init()
    {
        $this->setName('message');
        
		$id = new Zend_Form_Element_Hidden('id');
		$id->addFilter('Int');
		
		$sendto = new Zend_Form_Element_Text('sendto');
		$sendto->setLabel('To:')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty');
		
		$title = new Zend_Form_Element_Text('title');
		$title->setLabel('Title')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty');
				
		$text = new Zend_Form_Element_Textarea('text');
		$text->setAttrib('cols', '55')
    		 ->setAttrib('rows', '15');
		$text->setLabel('Text')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty');
				
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton');
		
		$this->addElements(array($id, $title, $text, $sendto, $submit));
    }


}

